package com.leanyuan.check.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.leanyuan.check.dao.ConditiontaskMapper_C;
import com.leanyuan.check.domain.Conditiontask;
import com.leanyuan.check.domain.Positionplan;
import com.leanyuan.check.dto.Conditiontaskdto;
import com.leanyuan.check.service.ConditiontaskService_C;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 相亲相爱一家人
 * @since 2021-05-25
 */
@Service
public class ConditiontaskServiceCImpl_C extends ServiceImpl<ConditiontaskMapper_C, Conditiontask> implements ConditiontaskService_C {

    @Autowired
    ConditiontaskMapper_C conditiontaskMapperC;

    @Override
    public Page<Conditiontaskdto> ConditiontasklistPage(Integer page, Integer size) {
        Page<Conditiontaskdto> pages = new Page<Conditiontaskdto>(page, size);
        Conditiontaskdto conditiontaskdto=new Conditiontaskdto();
        conditiontaskdto.setPositionplan(new Positionplan().setName("%%"));
        conditiontaskdto.setTaskcondition("未完成");
        return this.conditiontaskMapperC.selectSamplePageVoPage(pages, conditiontaskdto);
    }

    @Override
    public Page<Conditiontaskdto> ConditiontasklistPage1(Integer page, Integer size, Conditiontaskdto conditiontaskdto) {
        Page<Conditiontaskdto> pages = new Page<Conditiontaskdto>(page, size);
        conditiontaskdto.setPositionplan(new Positionplan().setName("%"+conditiontaskdto.getPositionplan().getName()+"%"));
        return this.conditiontaskMapperC.selectSamplePageVoPage(pages, conditiontaskdto);
    }
}
